<?php
$page = new BUIControl('followBookingPage');
$activeOperation = Blyn::app()->getActiveOperation();
//$menuList = array('场地预订');
//$operation = Blyn::app()->getActiveOperation();
$wxMenu = new BUIWXMenu($activeOperation);
?>
<div class="tabbable tabs-left" style="margin-top: 15px;"> <!-- Only required for left/right tabs -->
    <ul class="nav nav-tabs" style="margin-bottom: 15px">
        <li class="active"><a href="#tab1" data-toggle="tab"><?php echo '分类查找'; ?></a></li>
        <li class=""><a href="#tab2" data-toggle="tab"><?php echo '我的预定'; ?></a></li>
        <li class=""><a href="#tab3" data-toggle="tab"><?php echo '微信菜单'; ?></a></li>
    </ul>
    <div class="tab-content">       
        <div class="tab-pane active" id="tab1" style="min-height: 380px;margin-right:2px;">    
            <?php
            $control1 = new BUIControl('bookingFind');
            $control1->addRenderView('booking_find');
            $control1->render();
            ?>
        </div>        
        <div class="tab-pane" id="tab2" style="min-height: 380px;margin-right:2px;">    
            <?php
            $control2 = new BUIControl('myBookingList');
            $control2->addRenderView('booking_list_unpaid');
            $control2->render();
            //$page->renderView('booking_list_unpaid');
            ?>
        </div>
        <div class="tab-pane" id="tab3" style="min-height: 380px;margin-right:2px;">    
            <p>
                <?php
                //followBooking页面，默认存储一个“场地预定”菜单
                $wxControl = new BUIWXControl('bookingCourt');
                echo $wxControl->getLink(
                        array('name' => '场地预定', 'id' => 'bookingCourt'), array(
                    'htmlOptions' => array(
                        'class' => 'btn', 'target' => '_blank'
                )));
                $bookingCourtUrl = $wxControl->getLinkUrl(
                        array('name' => '场地预订', 'id' => 'bookingCourt'));
                $bAppCommon = new BAppCommon();
                $bAppCommon->addOperationMenuToSpace(array('bookingCourt' => '场地预订' . '&%@' . $bookingCourtUrl));
                ?>
            </p>
            <p>
                <?php
                //manageBooking，默认存储一个“管理预订”菜单
                $wxControl2 = new BUIWXControl('manageBooking');
                echo $wxControl2->getLink(
                        array('name' => '管理预订', 'id' => 'manageBooking'), array(
                    'htmlOptions' => array(
                        'class' => 'btn', 'target' => '_blank'),
                    'theme' => 'mb_bootstrap'
                        )
                );
                $manageBookingUrl = $wxControl2->getLinkUrl(
                        array('name' => '管理预订', 'id' => 'manageBooking'), array(
                    'theme' => 'mb_bootstrap'
                ));
                $bAppCommon->addOperationMenuToSpace(array('manageBooking' => '管理预订' . '&%@' . $manageBookingUrl));
                ?>   
            </p>
            <p>
                <?php
                //manageBooking，默认存储一个“管理预订”菜单
                $wxControl3 = new BUIWXControl('userInfo');
                echo $wxControl3->getLink(
                        array('name' => '我的信息', 'id' => 'displayUserInfo'), array(
                    'htmlOptions' => array(
                        'class' => 'btn', 'target' => '_blank'),
                    'theme' => 'mb_bootstrap'
                        )
                );
                $displayUserInfoUrl = $wxControl3->getLinkUrl(
                        array('name' => '我的信息', 'id' => 'displayUserInfo'), array(
                    'theme' => 'mb_bootstrap'
                ));
                $bAppCommon->addOperationMenuToSpace(array('displayUserInfo' => '我的信息' . '&%@' . $displayUserInfoUrl));
                ?>   
            </p>
            <p>
                <?php
                //manageBooking，默认存储一个“审批申请”菜单
                $wxControl4 = new BUIWXControl('membershipControl');
                echo $wxControl4->getLink(
                        array('name' => '管理会员', 'id' => BUIMembership::Show_Approve_Membership), array(
                    'htmlOptions' => array(
                        'class' => 'btn', 'target' => '_blank'),
                    'theme' => 'mb_bootstrap'
                        )
                );
                $approveMemberInfoUrl = $wxControl2->getLinkUrl(
                        array('name' => '管理会员', 'id' => BUIMembership::Show_Approve_Membership), array(
                    'theme' => 'mb_bootstrap'
                ));
                $bAppCommon->addOperationMenuToSpace(array(BUIMembership::Show_Approve_Membership => '管理会员' . '&%@' . $approveMemberInfoUrl));
                ?>   
            </p>
            <p>
                <?php
                //manageBooking，默认存储一个“审批申请”菜单
                $wxControl5 = new BUIWXControl('userAuthenticate');
                echo $wxControl5->getLink(
                        array('name' => '用户认证', 'id' => BUIUser::Render_Authenticate_User), array(
                    'htmlOptions' => array(
                        'class' => 'btn', 'target' => '_blank'),
                    'theme' => 'mb_bootstrap'
                        )
                );
                $userAuthenticateUrl = $wxControl5->getLinkUrl(
                        array('name' => '用户认证', 'id' => BUIUser::Render_Authenticate_User), array(
                    'theme' => 'mb_bootstrap'
                ));
                $bAppCommon->addOperationMenuToSpace(array(BUIUser::Render_Authenticate_User => '用户认证' . '&%@' . $userAuthenticateUrl));
                ?>   
            </p>
            <p>
                <?php
                //manageBooking，默认存储一个“审批申请”菜单
                $wxControl6 = new BUIWXControl('sendWechatMessage');
                echo $wxControl5->getLink(
                        array('name' => '发送微信信息', 'id' => 'showSendWechatMessage'), array(
                    'htmlOptions' => array(
                        'class' => 'btn', 'target' => '_blank'),
                    'theme' => 'mb_bootstrap'
                        )
                );
                ?>   
            </p>
            <p>
                <?php
                //manageBooking，默认存储一个“涵信会员认证”菜单
                echo $wxControl5->getLink(
                        array('name' => '涵信会员认证', 'id' => BUIUser::Render_Authenticate_hamshun), array(
                    'htmlOptions' => array(
                        'class' => 'btn', 'target' => '_blank'),
                    'theme' => 'mb_bootstrap'
                        )
                );
                $hamshunUserAuthenticateUrl = $wxControl5->getLinkUrl(
                        array('name' => '涵信会员认证', 'id' => BUIUser::Render_Authenticate_hamshun), array(
                    'theme' => 'mb_bootstrap'
                ));
                $bAppCommon->addOperationMenuToSpace(array(BUIUser::Render_Authenticate_hamshun => '涵信会员认证' . '&%@' . $hamshunUserAuthenticateUrl));
                ?>   
            </p>
        </div>
    </div>
</div>



